package com.example.chatroom.service;


import com.example.chatroom.dto.HistoryMessageDTO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface ChatService {


    /**
     * 保存聊天记录
     * @param map
     * @param fromUserId
     * @param toUserId
     */
    void saveHistoryMessage(Map<String, Object> map, Long fromUserId, Long toUserId);

    /**
     * 获取聊天记录
     * @param toUserId
     * @return
     */
    List <HistoryMessageDTO> findHistory(Long toUserId, HttpServletRequest httpServletRequest);

}
